<?php

class Admin_Backup_RestoreInputView extends BlogAdminBaseView
{
	public function executeHtml(AgaviRequestDataHolder $rd)
	{
		$this->setupHtml($rd, 'blog');
        $ro = $this->getContext()->getRouting();
        
        // get list of files in the backup directory
        /* @var $backup_model Admin_BackupsModel */
        $backup_model = $this->getContext()->getModel('Backups', 'Admin');
        
        $files = $backup_model->getFilesInBackupsDir();

        $this->setAttribute('backup_files', $files);
		$this->setAttribute('title', 'Restore from backup');
		$this->setAttribute('submit_route', $ro->gen('backup.restore'));
	}
}

?>